<!-- 赵杨 知识对战 --> 
<template>
 <div class="game h100">
    <img v-if="ImgShow"  src="/img/Yang/知识对战 .png" alt="" srcset=""/>

    
    <router-link to="/home/game/index">
         <div class="ImgShow2" v-if="!ImgShow" >
            <h1>多一人懂法</h1>
            <h1>少一人吃亏</h1>
         </div>
    </router-link>
    
    <Yangson/>
    <!-- <Dialog/>
    <Index/> -->
 </div>
</template>

<script>
import Yangson from './Yang/Yangson.vue'
/* import Dialog from './Yang/Dialog.vue' */
import Index from './Yang/Index.vue'
import {mapState,mapMutations,mapActions} from 'vuex'

export default {
   //生命周期
   //准备挂载
   beforeMount() {
   },
   components:{
      Yangson,
     /*  Dialog, */
      Index
   },
   computed:{
    ...mapState("yang",['ImgShow'])
  },
   data(){
      return{

      }
   },
   methods:{
    ...mapActions("yang",['init']),
      
   },
   mounted() {
    this.init()
  },
}
</script>

<style scoped>
/* scoped 让样式只在当前组件生效  ！important(父子元素存在同样类名时用)*/
.game{
   background: #CECECE;
   display: flex;
   flex-direction: column;
}
.ImgShow2{
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 250%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    z-index: 0;
  }
  h1:nth-of-type(1){
  margin-top:5rem;
  }

img{
   width: 100%;
   height: 100%;
   position:absolute;
   top: 0;
   left: 0;
   z-index: 1;
   }



</style>